package com.cari.oa.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

@Entity 
@Table(name="T_OA_REPOSITORY")
public class OARepositoryEntity implements Serializable{
	private static final long serialVersionUID = 7729798011140153684L;
	
	private String id;
	private String title;
	private String creator;
	private Date createTime;
	private String content;
	private String problem;
	private String modifier;
	private Date modifyTime;
	private String remark;
	
	@Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	@Length(max = 100, message = "标题长度要小于100个字符")
    @Column(name = "TITLE")
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(max = 32, message = "创建人长度要小于32个字符")
    @Column(name = "CREATOR")
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creater) {
		this.creator = creater;
	}
	
    @Column(name = "CREATETIME")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
    @Column(name = "CONTENT")
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
    @Column(name = "PROBLEM")
	public String getProblem() {
		return problem;
	}
	public void setProblem(String problem) {
		this.problem = problem;
	}
	
	@Length(max = 32, message = "修改人名称长度要小于32个字符")
    @Column(name = "MODIFIER")
	public String getModifier() {
		return modifier;
	}
	public void setModifier(String modifier) {
		this.modifier = modifier;
	}
	
    @Column(name = "MODIFYTIME")
	public Date getModifyTime() {
		return modifyTime;
	}
	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	
    @Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}
